package com.example.demo.mapper;

import com.example.demo.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper//加上后会自动去找相应的配置文件
public interface ArticleInfoMapper {
    public int add(@Param("articleInfo") ArticleInfo articleInfo);
    //添加方法,(得到自增主键的id)
    public int addGetId(@Param("articleInfo") ArticleInfo articleInfo);

    //删除
    public int delById(@Param("id") Integer id);

    //修改标题
    public int updateTitle(@Param("id") Integer id, @Param("title") String title);

    //多表查询
    public List<ArticleInfo> getAll();
}
